#ifndef _NODETYPES_H
#define _NODETYPES_H

#include <string>

struct NodeTypes
{
	enum NODETYPE
	{
		BOOL,
		DRAW_GROUP,
		FLOAT,
		FOLDER,
		FRAGMENT_SHADER,
		FRAMEBUFFER_ATTACHMENT,
		INFORMATION,
		MODEL,
		PASS,
		PERSPECTIVE_ASPECT_CAMERA,
		PERSPECTIVE_CAMERA,
		ORTHOGRAPHIC_CAMERA,
		POSITION,
		RENDER_STATE,
		RENDER_TARGET,
		SAMPLER,
		SCENE,
		SHADER_PROGRAM,
		TEXTURE,
		TRANSFORMATION,
		VEC2,
		VEC3,
		VEC4,
		VERTEX_SHADER,
		VIEWPORT_SIZE,
		UNKNOWN
	};

	static NODETYPE getType(const std::string & type)
	{
		if (type == "bool") return BOOL;
		else if (type == "draw group") return DRAW_GROUP;
		else if (type == "float") return FLOAT;
		else if (type == "folder") return FOLDER;
		else if (type == "fragment shader") return FRAGMENT_SHADER;
		else if (type == "framebuffer attachment") return FRAMEBUFFER_ATTACHMENT;
		else if (type == "information") return INFORMATION;
		else if (type == "model") return MODEL;
		else if (type == "pass") return PASS;
		else if (type == "perspective aspect camera") return PERSPECTIVE_ASPECT_CAMERA;
		else if (type == "perspective camera") return PERSPECTIVE_CAMERA;
		else if (type == "orthographic camera") return ORTHOGRAPHIC_CAMERA;
		else if (type == "position") return POSITION;
		else if (type == "render state") return RENDER_STATE;
		else if (type == "render target") return RENDER_TARGET;
		else if (type == "sampler") return SAMPLER;
		else if (type == "scene") return SCENE;
		else if (type == "shader program") return SHADER_PROGRAM;
		else if (type == "texture") return TEXTURE;
		else if (type == "transformation") return TRANSFORMATION;
		else if (type == "vec2") return VEC2;
		else if (type == "vec3") return VEC3;
		else if (type == "vec4") return VEC4;
		else if (type == "vertex shader") return VERTEX_SHADER;
		else if (type == "viewport size") return VIEWPORT_SIZE;
		else return UNKNOWN;
	}

	static std::string getType(NODETYPE type)
	{
		switch (type)
		{
			case BOOL:
			return "bool";

			case DRAW_GROUP:
			return "draw group";

			case FLOAT:
			return "float";

			case FOLDER:
			return "folder";

			case FRAGMENT_SHADER:
			return "fragment shader";

			case FRAMEBUFFER_ATTACHMENT:
			return "framebuffer attachment";

			case INFORMATION:
			return "information";

			case MODEL:
			return "model";

			case PASS:
			return "pass";

			case PERSPECTIVE_ASPECT_CAMERA:
			return "perspective aspect camera";

			case PERSPECTIVE_CAMERA:
			return "perspective camera";
			
			case ORTHOGRAPHIC_CAMERA:
			return "orthographic camera";

			case POSITION:
			return "position";

			case RENDER_STATE:
			return "render state";

			case RENDER_TARGET:
			return "render target";

			case SAMPLER:
			return "sampler";

			case SCENE:
			return "scene";

			case SHADER_PROGRAM:
			return "shader program";

			case TEXTURE:
			return "texture";

			case TRANSFORMATION:
			return "transformation";

			case VEC2:
			return "vec2";

			case VEC3:
			return "vec3";

			case VEC4:
			return "vec4";

			case VERTEX_SHADER:
			return "vertex shader";

			case VIEWPORT_SIZE:
			return "viewport size";

		}

		return "unknown";
	}
};

#endif
